Object-Oriented Pickler Combinators and an Extensible Generation Framework
نویسندگان
چکیده
Serialization or pickling, i.e., persisting runtime objects by converting them into a binary or text representation is ubiquitous in distributed programming. Pickler combinators are a popular approach from functional programming designed to alleviate some of the tedium of writing pickling code by hand, but they don’t translate well to object-oriented programming due to qualities like open class hierarchies and subtyping polymorphism. Furthermore, both functional pickler combinators and Java-based serialization frameworks tend to be tied to a specific pickle format, leaving programmers no choice of how their data is persisted. In this paper, we present object-oriented pickler combinators and a framework for generating them at compile-time, designed to be the default serialization mechanism of the Scala programming language. Our framework is extensible; (1) using Scala’s implicit parameters, users can add their own easilyswappable pickle format, (2) using the type class pattern, users can provide their own custom picklers to override the default behavior of the Scala pickling framework. In addition to extensibility and need for little to no boilerplate, the static generation of our OO picklers achieves a factor 6 speedup over Java Serialization, and performs on par or up to 3 times faster than popular “fast” Java serialization frameworks like Kryo.
منابع مشابه
Design Patterns in an Object-Oriented Framework for Hypermedia
In this paper we analyze design patterns generating the architecture of an object-oriented framework for hypermedia. We briefly discuss our problem: building a software substrate for seamlessly extending object-oriented applications with a hypermedia interface and navigational styles; we next present the outstanding components of an object-oriented framework providing the desired functionality....
متن کاملEXEMPLARS: A Practical, Extensible Framework For Dynamic Text Generation
In this paper, we present EXEMPLARS, an object-oriented, rule-based framework designed to support practical, dynamic text generation, emphasizing its novel features compared to .existing hybrid systems that mix template-style and more sophisticated techniques. These features-.include an extensible classification-based text planning mechanism, a definition language that is a superset of the Java...
متن کاملFUNCTIONAL PEARL Pickler Combinators
The tedium of writing pickling and unpickling functions by hand is relieved using a combinator library similar in spirit to the well-known parser combinators. Picklers for primitive types are combined to support tupling, alternation, recursion, and structure sharing. Code is presented in Haskell; an alternative implementation in ML is discussed.
متن کاملTesting Extensible Design Patterns in Object-Oriented Frameworks through Scenario Templates
Design patterns have been used in object-oriented frameworks such as the IBM San Francisco framework, Apple’s Rhaspody, OpenStep, and WebObjects, and DIWB. However, few guidelines are available on to effectively test the software developed with design patterns. This paper first discusses the issues in testing applications developed with design patterns using an object-oriented framework. Two ki...
متن کاملA Theory of Staged Composition Synthesis ( Extended Version )
Composition synthesis is based on the idea of using inhabitation in combinatory logic with intersection types as a foundation for computing compositions from component repositories. Components implemented in a language L1 are exposed to composition synthesis in the form of typed combinator symbols. In practice, it is useful to augment the collection of components in the implementation language ...
متن کامل